/** {@code Card}类 对一张扑克牌的抽象 */
public class Card {//
    /** 扑克牌牌面的编号 */
    private final int value;
    /** 牌面花色字符 */
    private static final String[] suit = { "♦", "♣", "♥", "♠" };
    /** 牌面点数字符串 */
    private static final String[] face = { "2", "3", "4", "5", "6", "7", "8", "9", "10", "J", "Q", "K", "A" };
    /** 构造一张编号为 v 的扑克 */
    public Card(int v) {
        value = v;
    }

    /** 返回编号 */
    public int getValue() {
        return value;
    }

    /** 返回花色 */
    public int getSuit() {
        return value & 0x3;// value%4
    }

    /** 返回点数 */
    public int getFace() {
        return value >> 2;// value/4
    }

    @Override
    public String toString() {
        return suit[getSuit()] + face[getFace()];
    }
}